Feature/red team remediation#37
Merged
Merged
Conversation
…ings Previously, evaluate_candidates() unconditionally set candidate severity to 'warning' for any process-execution finding that was static or lacked AI influence -- completely ignoring the min_severity declared in the rule. SEC-007 declares min_severity: 'error', so static subprocess.run([...]) calls were reported as WARNING, hiding BLOCKER-class shell injection beneath most CI severity thresholds. Fix: before downgrading, look up min_severity from every matching rule config and clamp to the highest floor found. Severity order: blocker(3) > error(2) > warning(1) > ignore(0). Affects: SEC-007, FINOS-014, OWASP-002, RBI-018.
…tion - Converted MIT-014-A (os.system/popen/spawn), MIT-014-B (subprocess), and MIT-010-A (eval/exec/pickle/marshal) from regex-based patterns to tree-sitter AST-based function_call rules. - Extended cli.py to merge multiple function_call rules for the same canonical rule ID (like SEC-007) by building a list of allowed function names instead of clobbering. - Enhanced cli.py's regex combining to safely strip (?i) flags from sub-patterns and prepend (?i) to the combined regex, preventing PatternErrors. - Cleaned up Unicode decorative emojis from PolicyEngine verbose logs to prevent console encoding crashes on Windows (CP1252 environment). - Updated MITIGATION_SHA256 hash constant in constitution.py to seal the updated catalog.
- Rewrote SpokeRelayClient and MockHubServer to utilize websockets library instead of raw TCP sockets. - Aligned messages with Hub's authenticated handshake protocol: registers via SPOKE_REGISTER with regional key, awaits HUB_ACK, and processes real-time requests (FORENSIC_PULL, PING). - Implemented AES-256-GCM symmetric encryption for forensic pull payloads using secret key matching the Hub's decryption protocol. - Preserved backward compatibility with legacy test suite by offering dual-mapping on payload fields in mock server and decrypt/encrypt helpers. - Added websockets dependency to requirements.txt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.